package com.resou.reader.api.entry;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by ${Garrett} on 2018/9/29.
 * Contact me krouky@outlook.com
 */
public class SortSubBean implements Parcelable {
    private String categoryName;
    private int categoryId;
    private String coverUrl;
    private String novelCount;

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getNovelCount() {
        return novelCount;
    }

    public void setNovelCount(String novelCount) {
        this.novelCount = novelCount;
    }

    private List<SortSecBean> secSort;

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public List<SortSecBean> getSecSort() {
        return secSort;
    }

    public void setSecSort(List<SortSecBean> secSort) {
        this.secSort = secSort;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.categoryName);
        dest.writeInt(this.categoryId);
        dest.writeString(this.novelCount);
        dest.writeString(this.coverUrl);
        dest.writeTypedList(this.secSort);
    }

    public SortSubBean() {
    }

    protected SortSubBean(Parcel in) {
        this.categoryName = in.readString();
        this.categoryId = in.readInt();
        this.coverUrl = in.readString();
        this.novelCount = in.readString();
        this.secSort = in.createTypedArrayList(SortSecBean.CREATOR);
    }

    public static final Creator<SortSubBean> CREATOR = new Creator<SortSubBean>() {
        @Override
        public SortSubBean createFromParcel(Parcel source) {
            return new SortSubBean(source);
        }

        @Override
        public SortSubBean[] newArray(int size) {
            return new SortSubBean[size];
        }
    };
}
